<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});



//Route::group(['middleware' => 'web'], function () {
//    Route::auth();
//
//    Route::get('list', 'InfoController@search');
//});

//Route::group(['prefix' => 'admin'], function () {
Route::group(['prefix' => ''], function () {
//    Route::group(['middleware' => 'web'], function () {
        Auth::routes();
//    });
    Route::get('logout', 'Auth\LoginController@logout');
    Route::post('logout', 'Auth\LoginController@logout');

    Route::post('imageUpload', 'UploadController@ajaxImageUpload');
    Route::post('editorUpload', 'UploadController@ajaxCKEditorUpload');
    Route::post('infoSave', 'InfoController@infoSave');
    Route::post('contentSave', 'InfoController@contentSave');
    Route::get('list', 'InfoController@search');
    Route::get('list', 'InfoController@search');
    Route::get('info/{infoId?}', 'InfoController@info');
    Route::get('delete/{infoId}', 'InfoController@delete');
    Route::get('content/{infoId}/{pageNo?}', 'InfoController@content');
    Route::get('column/get/{parentId}', 'WebColumnController@ajaxGetColumnsByParentId');
});
